package com.ruoyi.map.service.impl;

import com.ruoyi.map.domain.FhMapWatercommonfish;
import com.ruoyi.map.mapper.FhMapWatercommonfishMapper;
import com.ruoyi.map.service.IFhMapWatercommonfishService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 水域常见鱼种管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-13
 */
@Service
public class FhMapWatercommonfishServiceImpl implements IFhMapWatercommonfishService 
{
    @Autowired
    private FhMapWatercommonfishMapper fhMapWatercommonfishMapper;

    /**
     * 查询水域常见鱼种管理
     * 
     * @param id 水域常见鱼种管理主键
     * @return 水域常见鱼种管理
     */
    @Override
    public FhMapWatercommonfish selectFhMapWatercommonfishById(Long id)
    {
        return fhMapWatercommonfishMapper.selectFhMapWatercommonfishById(id);
    }

    /**
     * 查询水域常见鱼种管理列表
     * 
     * @param fhMapWatercommonfish 水域常见鱼种管理
     * @return 水域常见鱼种管理
     */
    @Override
    public List<FhMapWatercommonfish> selectFhMapWatercommonfishList(FhMapWatercommonfish fhMapWatercommonfish)
    {
        return fhMapWatercommonfishMapper.selectFhMapWatercommonfishList(fhMapWatercommonfish);
    }

    /**
     * 新增水域常见鱼种管理
     * 
     * @param fhMapWatercommonfish 水域常见鱼种管理
     * @return 结果
     */
    @Override
    public int insertFhMapWatercommonfish(FhMapWatercommonfish fhMapWatercommonfish)
    {
        return fhMapWatercommonfishMapper.insertFhMapWatercommonfish(fhMapWatercommonfish);
    }

    /**
     * 修改水域常见鱼种管理
     * 
     * @param fhMapWatercommonfish 水域常见鱼种管理
     * @return 结果
     */
    @Override
    public int updateFhMapWatercommonfish(FhMapWatercommonfish fhMapWatercommonfish)
    {
        fhMapWatercommonfish.setUpdateTime(LocalDateTime.now());
        return fhMapWatercommonfishMapper.updateFhMapWatercommonfish(fhMapWatercommonfish);
    }

    /**
     * 批量删除水域常见鱼种管理
     * 
     * @param ids 需要删除的水域常见鱼种管理主键
     * @return 结果
     */
    @Override
    public int deleteFhMapWatercommonfishByIds(Long[] ids)
    {
        return fhMapWatercommonfishMapper.deleteFhMapWatercommonfishByIds(ids);
    }

    /**
     * 删除水域常见鱼种管理信息
     * 
     * @param id 水域常见鱼种管理主键
     * @return 结果
     */
    @Override
    public int deleteFhMapWatercommonfishById(Long id)
    {
        return fhMapWatercommonfishMapper.deleteFhMapWatercommonfishById(id);
    }

    @Override
    public List<FhMapWatercommonfish> selectMapWatercommonfishListByWaterId(Long waterId) {

        return fhMapWatercommonfishMapper.selectMapWatercommonfishListByWaterId(waterId);
    }

    @Override
    public void deleteFhMapWatercommonfishByWaterIds(Long[] waterIdList) {
        fhMapWatercommonfishMapper.deleteFhMapWatercommonfishByWaterIds(waterIdList);
    }
}
